@import "tailwindcss";
@import "tw-animate-css";

@custom-variant dark (&:is(.dark *));

:root {
  /* Premium light theme - based on provided source code design */
  --background: #ffffff;                  /* Pure white background */
  --foreground: #475569;                  /* Professional slate-600 text */
  --card: #ffffff;                       /* Pure white card background for light theme */
  --card-foreground: #475569;            /* Matching card text */
  --popover: #ffffff;                    /* Pure white popover */
  --popover-foreground: #475569;         /* Professional popover text */
  --primary: #10b981;                    /* Emerald primary color */
  --primary-foreground: #ffffff;         /* White text on primary */
  --secondary: #e0e0e0;                  /* Light gray secondary */
  --secondary-foreground: #475569;       /* Professional secondary text */
  --muted: #f9f9f9;                      /* Subtle muted background */
  --muted-foreground: #475569;           /* Professional muted text */
  --accent: #10b981;                     /* Emerald accent color */
  --accent-foreground: #ffffff;          /* White text on accent */
  --destructive: #be123c;                /* Professional red for losses */
  --destructive-foreground: #ffffff;     /* White text on destructive */
  --success: #10b981;                    /* Emerald success color */
  --success-foreground: #ffffff;         /* White text on success */
  --border: #e0e0e0;                     /* Light gray border */
  --input: #ffffff;                      /* White input background */
  --ring: #10b981;                       /* Emerald focus ring */
  --chart-1: #10b981;                    /* Emerald chart color */
  --chart-2: #be123c;                    /* Red chart color */
  --chart-3: #475569;                    /* Slate chart color */
  --chart-4: #f9f9f9;                    /* Light chart color */
  --chart-5: #ffffff;                    /* White chart color */
  --radius: 0.5rem;
  --sidebar: #ffffff;                    /* White sidebar */
  --sidebar-foreground: #475569;         /* Professional sidebar text */
  --sidebar-primary: #10b981;            /* Emerald sidebar primary */
  --sidebar-primary-foreground: #ffffff; /* White sidebar primary text */
  --sidebar-accent: #e0e0e0;             /* Light sidebar accent */
  --sidebar-accent-foreground: #475569;  /* Professional sidebar accent text */
  --sidebar-border: #e0e0e0;             /* Light sidebar border */
  --sidebar-ring: #10b981;               /* Emerald sidebar ring */
}

.dark {
  /* Updated dark theme for professional trading interface */
  --background: oklch(0.12 0 0);
  --foreground: oklch(0.98 0 0);
  --card: oklch(0.16 0 0);
  --card-foreground: oklch(0.98 0 0);
  --popover: oklch(0.16 0 0);
  --popover-foreground: oklch(0.98 0 0);
  --primary: oklch(0.98 0 0);
  --primary-foreground: oklch(0.12 0 0);
  --secondary: oklch(0.2 0 0);
  --secondary-foreground: oklch(0.98 0 0);
  --muted: oklch(0.2 0 0);
  --muted-foreground: oklch(0.65 0 0);
  --accent: oklch(0.65 0.15 280);
  --accent-foreground: oklch(0.98 0 0);
  --destructive: oklch(0.65 0.2 25);
  --destructive-foreground: oklch(0.98 0 0);
  --success: oklch(0.55 0.15 145);
  --success-foreground: oklch(0.98 0 0);
  --border: oklch(0.2 0 0);
  --input: oklch(0.2 0 0);
  --ring: oklch(0.65 0.15 280);
  --chart-1: oklch(0.65 0.15 280);
  --chart-2: oklch(0.65 0.2 25);
  --chart-3: oklch(0.55 0.15 145);
  --chart-4: oklch(0.6 0.15 60);
  --chart-5: oklch(0.5 0.1 200);
  --sidebar: oklch(0.12 0 0);
  --sidebar-foreground: oklch(0.98 0 0);
  --sidebar-primary: oklch(0.65 0.15 280);
  --sidebar-primary-foreground: oklch(0.98 0 0);
  --sidebar-accent: oklch(0.2 0 0);
  --sidebar-accent-foreground: oklch(0.98 0 0);
  --sidebar-border: oklch(0.2 0 0);
  --sidebar-ring: oklch(0.65 0.15 280);
}

@theme inline {
  --font-sans: var(--font-geist-sans);
  --font-mono: var(--font-geist-mono);
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-card: var(--card);
  --color-card-foreground: var(--card-foreground);
  --color-popover: var(--popover);
  --color-popover-foreground: var(--popover-foreground);
  --color-primary: var(--primary);
  --color-primary-foreground: var(--primary-foreground);
  --color-secondary: var(--secondary);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
  --color-destructive: var(--destructive);
  --color-destructive-foreground: var(--destructive-foreground);
  /* Added success color tokens for stock gains */
  --color-success: var(--success);
  --color-success-foreground: var(--success-foreground);
  --color-border: var(--border);
  --color-input: var(--input);
  --color-ring: var(--ring);
  --color-chart-1: var(--chart-1);
  --color-chart-2: var(--chart-2);
  --color-chart-3: var(--chart-3);
  --color-chart-4: var(--chart-4);
  --color-chart-5: var(--chart-5);
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --color-sidebar: var(--sidebar);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-sidebar-primary: var(--sidebar-primary);
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  --color-sidebar-border: var(--sidebar-border);
  --color-sidebar-ring: var(--sidebar-ring);
}

@layer base {
  * {
    @apply border-border outline-ring/50;
  }
  
  html {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
  
  body {
    @apply bg-background text-foreground;
    min-height: 100vh;
    font-size: 16px;
  }
  
  /* Light theme only - Remove card background, keep only shadows and borders */
  :root:not(.dark) .bg-success\/10 {
    @apply bg-transparent shadow-[0_2px_20px_rgba(16,185,129,0.08)] border-emerald-100/80;
  }
  
  :root:not(.dark) .bg-destructive\/10 {
    @apply bg-transparent shadow-[0_2px_20px_rgba(190,18,60,0.08)] border-rose-100/80;
  }
  
  :root:not(.dark) .bg-accent\/10 {
    @apply bg-transparent shadow-[0_2px_20px_rgba(16,185,129,0.06)] border-slate-100/80;
  }
  
  /* Light theme card hover effects */
  :root:not(.dark) .bg-success\/10:hover {
    @apply shadow-[0_8px_40px_rgba(16,185,129,0.12)] scale-[1.02] -translate-y-1;
    transition: all 0.5s ease;
  }
  
  :root:not(.dark) .bg-destructive\/10:hover {
    @apply shadow-[0_8px_40px_rgba(190,18,60,0.12)] scale-[1.02] -translate-y-1;
    transition: all 0.5s ease;
  }
  
  :root:not(.dark) .bg-accent\/10:hover {
    @apply shadow-[0_8px_40px_rgba(16,185,129,0.08)] scale-[1.02] -translate-y-1;
    transition: all 0.5s ease;
  }
}
